<template>
	<view class="prize-item">
		<image :src="info.prizeUrl" mode="widthFix" class="prize-img"></image>
		<view class="padding30 font-siez15">
			<view class="color-white">奖品：{{info.prizeName||''}}</view>
			<view class="color-white margin-top20">
				<text>数量：</text>
				<text style="color: #ffeb00;">{{info.prizeAmount||''}}份</text>
			</view>
			<view class="mc-f12 margin-top20" style="color: #d6d6d6;">{{info.lotteryTime||''}} 自动开奖</view>
		</view>
		<view class="prize-item_bottom mc-space-between mc-flex-center mc-f14 padding-top30 padding-bottom30 color-white">
			<view class="mc-flex-vcenter">
				<text>赞助方</text>
			</view>
			<form @submit="setFormId" report-submit="true">
				<button form-type="submit" open-type="openGroupProfile" group-id="689922863" class="mc-flex-vcenter formId-btn">
					<text>红包福利群</text>
					<image src="../../../static/images/right-arrow.png" mode="widthFix" style="width: 30rpx;"></image>
				</button>
			</form>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			info: {
				type: Object,
				default: {}
			},
		},
		data() {
			return {
				customerNum: '743914078'
			}
		},
		methods: {
			setClipboardData(data) {
				this.$store.dispatch('videoAd/show', {
					success: () => {
						uni.setClipboardData({
							data,
							success: function() {
								uni.showModal({
									title: '已复制',
									content: '客服QQ: 743914078',
									showCancel: false,
									success: function(res) {
										if (res.confirm) {
											// console.log('用户点击确定');
										}
									}
								});
							}
						});
					},
					fail: () => {
						uni.showToast({
							title: '播放失败',
							icon: 'none'
						});
					}
				});
			},
			// ---------------------------------------
			// 保存二维码
			setFormId(e) {
				this.$store.dispatch('common/formIdListUp', {
					e: e,
					isSave: true
				})
			},
		},
	}
</script>

<style lang="scss" scoped>
	.prize-item {
		position: relative;
		width: 690rpx;
		margin: 40rpx auto;
		z-index: 9;
		background-color: #2e2c83;
		border-radius: 10rpx;
		overflow: hidden;
	}

	.prize-img {
		display: block;
		width: 100%;
	}

	.prize-item_bottom {
		position: relative;
		padding: 30rpx;

		&:before {
			content: ' ';
			position: absolute;
			top: 0;
			left: 30rpx;
			right: 30rpx;
			border-top: 1px solid #e5e5e5;
			opacity: 0.3;
		}
	}
</style>
